import {config} from '../config.js'

export class http {
  request(params){
    if(!params.method){
      params.method='GET'
    }
    wx.request({
      url: config.api_blink_url+params.url,
      method:params.method,
      data:params.data,
      header: {
        'content-type': 'application/json',
        'appkey': config.appkey
      },
      success:(res) => {
        let code=res.statusCode.toString()
        if(code.startsWith=='2'){

        }else{

        }
      },
      fail:(err)=>{

      }
    })
  }
}
// export{ http }